IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spSys_UserInsert')
	BEGIN
		DROP  Procedure  spSys_UserInsert
	END
GO
-- =============================================
-- Author:		NAMTRANPHUONG
-- Create date: August 18, 2012
-- Description:	Select Group user infor
-- =============================================
CREATE PROCEDURE spSys_UserInsert 
	@UserId INT,
	@Username NVARCHAR(200),
	@Password NVARCHAR(32),
	@DisplayName NVARCHAR(200),
	@Email NVARCHAR(100),
	@Mobile VARCHAR(50),
	@Address NVARCHAR(300),
	@CreatedDate DATETIME,
	@CreatedBy INT,
	@Status SMALLINT
AS
BEGIN
	INSERT INTO Sys_User
	([Username]
      ,[Password]
      ,[DisplayName]
      ,[Email]
      ,[Mobile]
      ,[Address]
      ,[CreatedDate]
      ,[CreatedBy]
      ,[Status])
	VALUES
	(@Username
      ,@Password
      ,@DisplayName
      ,@Email
      ,@Mobile
      ,@Address
      ,GETDATE()
      ,@CreatedBy
      ,@Status
      )
    DECLARE @ID INT
	SELECT @ID = @@IDENTITY
END
GO
